/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mighty.team.homemediacenterdescriptor.service;

import com.mighty.team.homemediacenterdescriptor.dao.MovieDAO;
import com.mighty.team.homemediacenterdescriptor.model.Movie;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author TSokolowski
 */

@Service("movieServiceImpl")
@Transactional
public class MovieServiceImpl implements MovieService{

    @Autowired   
    private MovieDAO movieDAO;
    
   
    
    public void addMovie(Movie movie) {
        movieDAO.addMovie(movie);        
    }

    
    
    public void updateMovie(Movie movie) {
        movieDAO.updateMovie(movie);        
    }

    
    public Movie getMovie(int id) {
        return movieDAO.getMovie(id);
    }

    
    public void removeMovie(int id) {
        movieDAO.removeMovie(id);
    }

    
    public List<Movie> getMovies() {
        return movieDAO.getMovies();
    }
    
}
